#ifndef TRANSACTION_H
#define TRANSACTION_H

#include <sstream>
#include <QString>
#include <QMap>

class Transaction
{
public:
    typedef QMap<QString, QString> TypeTransColum;

    Transaction(QString name, unsigned long long time);
    Transaction(const Transaction& transaction);
    Transaction& operator=(const Transaction& transaction);
    Transaction();
    virtual ~Transaction();

    void appendColum(QString key, QString value);
    void setTime(unsigned long long Time) { m_timestamp = Time; }

    const TypeTransColum& getColum() const;
    unsigned long long getTime() const;

    QString getName() const;
    QString findValueByColumName(const QString& columName, bool& found) const;
private:
    unsigned long  long m_timestamp;
    QString m_name;
    TypeTransColum m_colum;
};

#endif // TRANSACTION_H
